package battlebarnapplet;
import java.io.File;
import java.io.IOException;
import java.net.URL;

import javax.sound.sampled.LineUnavailableException;
import javax.sound.sampled.UnsupportedAudioFileException;

import battlebarnapplet.util.Util;

public class SoundEffectThread implements Runnable {
	
	URL soundFile;
	
	public SoundEffectThread(URL sFile) {
		soundFile = sFile;
	}

	public void run() {
		try {
			Util.playClip(soundFile);
		} catch (UnsupportedAudioFileException e) {
			e.printStackTrace();
		} catch (LineUnavailableException e) {
			e.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		}
		
	}

}
